<template>
    <div>
        <group>
            <popup-radio name="popupradiodemo" title="测试" :options="filterList" v-model="pupop.value">
                <x-input slot="popup-header" v-model="keyWord" @input="keyWordFilter"></x-input>
            </popup-radio>
        </group>
    </div>
</template>

<script>import {Group, PopupRadio, XInput} from 'vux'

export default {
    name: "VuxPupopRadio",
    components: {
        Group,
        PopupRadio,
        XInput
    },
    data() {
        return {
            keyWord: '',
            pupop: {
                value1: "1",
                value2: "2"
            },
            list: ['1', '2', '3', '1234567'],
            filterList: []
        }
    },
    created() {
        this.filterList = this.list
    },
    watch: {
        keyWord(){
            console.log(this.list)
        }
    },
    methods: {
        keyWordFilter() {
            this.filterList = this.list.filter(item => {
                if (item.includes(this.keyWord))
                    return item
            })
        }
    }
}
</script>

<style scoped>

</style>
